//
//  MantisAcademicCellData.m
//  NLProjectFrameworkDemo
//
//  Created by iosdeveloper on 2020/4/26.
//  Copyright © 2020 yj_zhang. All rights reserved.
//

#import "MantisAcademicCellData.h"


@implementation MantisAcademicCellData
-(CGSize)contentSize{

    CGSize size = CGSizeMake(IMSCREEN_WIDTH, adaptWidth750(120*2));//30为两个cell固定间隔
    
    return size;
}




@end

@implementation MantisTextCellContentData
+(NSDictionary *)mj_objectClassInArray{
    return @{@"content":[MantisTextCellSubContentData class]};
}
@end

@implementation MantisTextCellSubContentData

-(BOOL)isChoiceRes{
    return true;
}

-(CGSize)contentSize{
    NSString*contentStr=self.label;
        
        CGRect rect = [contentStr boundingRectWithSize:CGSizeMake(300, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName :KIMFontRegularSize(16)} context:nil];
        CGSize size = CGSizeMake(ceilf(rect.size.width)+1, ceilf(rect.size.height));
        CGFloat orgiWidth=size.width;
        CGFloat orgHeight=size.height;
        if (orgiWidth<adaptWidth750(120)) {
            orgiWidth=adaptWidth750(120);//cell最低高度
        }
        
        if (orgHeight<adaptWidth750(80)) {
            orgHeight=adaptWidth750(80);//cell最小宽度
        }
        
        CGSize newSize =CGSizeMake(orgiWidth, orgHeight);
    //    // 加上气泡边距
    //    size.height += 30;
    //    size.width += 30;

        return newSize;
}



@end
